﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>测测你的宅腐基指数-开始测试吧!</title>

    <script type="text/javascript" src="script/jquery.min.js"></script>

    <link href="css/main.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript">
        $(document).ready(function() {
            $(".chkbox").click(function() {
                if ($(this).hasClass('chkon')) {
                    $(this).find(".chkValue").attr("checked", false);
                    $(this).removeClass('chkon');
                } else {
                    $(this).find(".chkValue").attr("checked", true);
                    $(this).addClass('chkon');
                }
                return true;
            });

            $(".btn_start").click(function() {
                var cbvalues = "";

                $(".chkValue").each(function() {
                if ($(this).attr("checked")) {
                        cbvalues += $(this).val() + ","
                    }
                });

                if (cbvalues.length == 0) {
                    alert("请选择测试选项,然后在开始测试吧!");
                    return;
                }

                $.get("ScoreHandler.ashx?action=tested&resultscoredetail=" + cbvalues + "&random=" + Math.random(),
                function(data) {
                    var result = eval("(" + data + ")")
                    window.location.href = result.url;
                }),
                "json"});
            });

            
         $(document).ready(function() { 
            $.get("ScoreHandler.ashx?action=getuserdisplay&random=" + Math.random(),
            function(data) {
                var result = eval("(" + data + ")")
                $(".weibo_name").html(result.displayname);
            }),"json"});
		</script>

</head>
<body>
    <div id="wrapper" class="body02">
        <a href="http://www.e-lining.com/" class="pos b_logo" title="进入李宁官方网站"></a><span class="pos weibo_name">慈恩大师食肉记
        </span><a href="#" class="pos btn_start" title="现在开始测试吧"></a>
        <div class="pos xbox">
            <a class="pos chkbox chk01">
                <input type="checkbox" class="chkValue" name="chk" value="1" /></a> <a class="pos chkbox chk02">
                    <input type="checkbox" class="chkValue" name="chk" value="2" /></a> <a class="pos chkbox chk03">
                        <input type="checkbox" class="chkValue" name="chk" value="3" /></a>
            <a class="pos chkbox chk04">
                <input type="checkbox" class="chkValue" name="chk" value="4" /></a> <a class="pos chkbox chk05">
                    <input type="checkbox" class="chkValue" name="chk" value="5" /></a> <a class="pos chkbox chk06">
                        <input type="checkbox" class="chkValue" name="chk" value="6" /></a>
            <a class="pos chkbox chk07">
                <input type="checkbox" class="chkValue" name="chk" value="7" /></a> <a class="pos chkbox chk08">
                    <input type="checkbox" class="chkValue" name="chk" value="8" /></a> <a class="pos chkbox chk09">
                        <input type="checkbox" class="chkValue" name="chk" value="9" /></a>
            <a class="pos chkbox chk10">
                <input type="checkbox" class="chkValue" name="chk" value="10" /></a>
        </div>
    </div>
</body>
</html>
